package cn.itsource.langxun.client;

import cn.itsource.langxun.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "COMMON-SERVICE",fallbackFactory = PageClientFallbackFacotry.class )
@Component
public interface PageClient {

    /**
     * 页面静态化
     * @param templatePath 模板文件路径
     * @param targetPath 目标文件路径
     * @param data 数据
     */
    @PostMapping("/page")
    AjaxResult genStaticPage(@RequestParam("templatePath") String templatePath,
                             @RequestParam("targetPath") String targetPath,
                             @RequestBody Object data);

}
